package com.cskaoyan.bean;

//代理类 → 代理类存在着和委托类相同的方法：形参、方法名、返回值
public class SongBrother2 extends LiuShifu{

    public void buyBreakfast() {
        //委托类要做的事情
        super.buyBreakfast();
        //增强
        enhance();
    }

    public void buyLunch() {
        super.buyLunch();
        enhance();
    }
    private void enhance() {
        System.out.println("一根烤肠");
    }
}
